Python Classification Feature Extraction for Timbl

(C) 2017 by Damir Cavar

This is a tutorial related to the discussion of feature extraction for classification and clustering in the textbook Machine Learning: The Art and Science of Algorithms that Make Sense of Data by Peter Flach.

This tutorial was developed as part of my course material for the course Machine Learning for Computational Linguistics in the Computational Linguistics Program of the Department of Linguistics at Indiana University.

Feature Extraction


In [1]:
from nltk import word_tokenize

In [25]:
text1 = """The city will pay for it by taxes on properties selling for more
than $5 million.

The real estate transfer tax, as it's called, was increased last year for both
residential and commercial properties. The hike was approved by voters in
November.
Powered by SmartAsset.com
SmartAsset.com

The tax starts at 2.25% and goes up to 3% for properties worth at least $25
million. It's expected to bring in an average of $45 million a year, according
to the city controller. But the money goes into the city's general fund and is
also expected to be used for affordable housing and senior support services.

The free tuition plan is expected to impact about 28,000 residents who currently
take classes at City College of San Francisco and encourage more people to sign
up. Chancellor Susan Lamb said the school has the capacity for 85,000 students.

It's difficult to predict how many more people will enroll, and how much the
free-tuition plan will end up costing. San Francisco has committed $5.4 million
a year for the next two years, and then will have to reassess. That includes a
one-time $500,000 stipend to City College to help handle an influx of students.

Related: Why New York's 'tuition-free colleges' still cost $14K

San Francisco's tuition-free plan is more progressive than others round the
country. First, everyone is eligible as long as they have resided in San Francisco
for at least one year.

It covers the $46 cost per credit no matter how rich you are, "even to the
children of the founders of Facebook," said city lawmaker Jane Kim.

You don't have to be enrolled full-time or be a recent high school graduate.
This means that people who are seeking job retraining or want to take a few
foreign language courses won't have to pay for the cost of the credits.

Related: Rhode Island governor wants to make college free, too

Students will still be on the hook for the mandatory $17 per semester fee at
City College and the cost of books, so college won't necessarily be free.

What also sets apart San Francisco's plan is that it offers the poorest students
additional money to help pay for these other expenses. An individual has to earn
less than $17,000 a year to qualify for the aid, or less than $37,000 for a
family of four. Eligible full-time students will get $500 a year and part-time
students will get $200 a year.

"We have the fastest growing income gap than any city across the nation," Kim said
on Monday at a press conference.

"Making city college free is going to provide greater opportunities for more San
Franciscans to enter into the middle class and more San Franciscans to stay in the
middle class if they currently are," she said.

The push for free tuition is gaining support across the country. Tennessee started
offering free community college to residents in 2015, and will expand the program
this year to include adults returning to school. Lawmakers in New York are
discussing a program that would make four-year and two-year public colleges
tuition-free for residents who earn less than $125,000 a year. And Rhode Island's
governor is pushing for two free years at public colleges for recent high school
graduates."""

In [66]:
tokens1 = word_tokenize(text1.lower())

In [67]:
from collections import Counter

In [68]:
fp = Counter(tokens1)

print(fp)


Counter({'.': 26, 'the': 24, 'to': 24, 'for': 18, ',': 14, '$': 13, 'and': 12, 'a': 12, 'year': 9, 'of': 8, 'is': 8, "'s": 8, 'will': 8, 'San': 7, 'free': 7, 'at': 7, 'The': 6, 'than': 6, 'in': 6, 'city': 6, 'more': 6, 'have': 5, 'be': 5, 'students': 5, 'Francisco': 5, 'cost': 4, 'said': 4, 'plan': 4, 'school': 4, 'college': 4, 'million': 4, 'are': 4, 'It': 3, 'on': 3, 'or': 3, 'up': 3, "n't": 3, 'colleges': 3, 'residents': 3, 'less': 3, 'people': 3, 'by': 3, 'pay': 3, 'that': 3, 'how': 3, 'City': 3, 'expected': 3, 'has': 3, 'properties': 3, 'who': 3, 'it': 3, 'College': 3, '``': 3, "''": 3, 'as': 3, 'across': 2, 'middle': 2, 'earn': 2, 'goes': 2, 'they': 2, 'Related': 2, 'tuition-free': 2, 'full-time': 2, '%': 2, 'support': 2, 'an': 2, 'years': 2, 'take': 2, 'York': 2, 'was': 2, 'public': 2, ':': 2, 'class': 2, 'Rhode': 2, 'Kim': 2, 'money': 2, 'two': 2, 'least': 2, 'also': 2, 'New': 2, 'program': 2, 'currently': 2, 'per': 2, 'governor': 2, 'Island': 2, 'help': 2, 'into': 2, 'tax': 2, 'get': 2, 'country': 2, 'SmartAsset.com': 2, 'tuition': 2, 'wo': 2, 'Franciscans': 2, 'make': 2, 'high': 2, 'recent': 2, 'still': 2, 'progressive': 1, 'wants': 1, 'last': 1, 'fund': 1, 'We': 1, 'she': 1, '5': 1, 'called': 1, 'affordable': 1, 'Powered': 1, 'transfer': 1, 'foreign': 1, 'enter': 1, '125,000': 1, 'community': 1, 'pushing': 1, 'approved': 1, 'gap': 1, 'going': 1, 'even': 1, 'income': 1, '17': 1, 'nation': 1, 'include': 1, 'gaining': 1, 'apart': 1, 'part-time': 1, 'capacity': 1, 'matter': 1, 'used': 1, '28,000': 1, 'individual': 1, 'sign': 1, '500,000': 1, 'fastest': 1, '46': 1, 'resided': 1, 'classes': 1, 'commercial': 1, 'First': 1, 'Chancellor': 1, 'worth': 1, 'starts': 1, 'round': 1, 'influx': 1, 'credits': 1, 'You': 1, 'too': 1, 'voters': 1, 'estate': 1, 'What': 1, 'Making': 1, 'handle': 1, "'tuition-free": 1, '37,000': 1, 'hike': 1, 'seeking': 1, 'stay': 1, 'Monday': 1, 'push': 1, '45': 1, 'four': 1, 'additional': 1, 'qualify': 1, 'books': 1, 'Susan': 1, 'necessarily': 1, 'much': 1, 'provide': 1, 'opportunities': 1, 'offering': 1, 'real': 1, 'do': 1, 'lawmaker': 1, 'then': 1, '85,000': 1, '14K': 1, 'Lawmakers': 1, 'semester': 1, 'eligible': 1, 'Eligible': 1, 'reassess': 1, 'both': 1, 'aid': 1, 'adults': 1, 'four-year': 1, 'An': 1, '17,000': 1, 'this': 1, 'founders': 1, 'retraining': 1, '2.25': 1, 'any': 1, 'This': 1, 'November': 1, 'housing': 1, 'And': 1, 'senior': 1, 'other': 1, 'one-time': 1, 'conference': 1, 'if': 1, 'mandatory': 1, 'courses': 1, 'long': 1, 'free-tuition': 1, 'graduate': 1, 'would': 1, 'controller': 1, 'poorest': 1, '5.4': 1, 'so': 1, "'": 1, 'according': 1, 'children': 1, 'increased': 1, 'next': 1, 'discussing': 1, 'many': 1, 'Jane': 1, 'fee': 1, 'family': 1, 'returning': 1, 'growing': 1, 'want': 1, 'services': 1, 'impact': 1, 'no': 1, 'press': 1, 'expenses': 1, 'That': 1, 'But': 1, 'hook': 1, '2015': 1, 'graduates': 1, 'enrolled': 1, '3': 1, 'everyone': 1, 'language': 1, 'includes': 1, 'average': 1, 'offers': 1, 'greater': 1, 'others': 1, 'one': 1, 'you': 1, 'rich': 1, 'means': 1, 'job': 1, 'encourage': 1, 'these': 1, 'expand': 1, 'started': 1, 'Lamb': 1, 'taxes': 1, 'costing': 1, 'bring': 1, 'committed': 1, 'stipend': 1, 'about': 1, 'Students': 1, 'general': 1, 'difficult': 1, 'two-year': 1, 'Why': 1, 'Tennessee': 1, 'enroll': 1, 'selling': 1, 'end': 1, 'predict': 1, '25': 1, 'covers': 1, '200': 1, 'residential': 1, '500': 1, 'Facebook': 1, 'few': 1, 'credit': 1, 'sets': 1})

In [69]:
model = [ (i, fp[i], len(i)) for i in fp ]

print(model)


[('across', 2, 6), ('progressive', 1, 11), ('have', 5, 4), ('middle', 2, 6), ('wants', 1, 5), ('earn', 2, 4), ('last', 1, 4), ('It', 3, 2), ('for', 18, 3), ('fund', 1, 4), ('of', 8, 2), ('on', 3, 2), ('We', 1, 2), ('she', 1, 3), ('goes', 2, 4), ('they', 2, 4), ('5', 1, 1), ('called', 1, 6), ('cost', 4, 4), ('affordable', 1, 10), ('Powered', 1, 7), ('.', 26, 1), ('or', 3, 2), ('transfer', 1, 8), ('foreign', 1, 7), ('up', 3, 2), ('enter', 1, 5), ('said', 4, 4), ('Related', 2, 7), ("n't", 3, 3), ('125,000', 1, 7), ('colleges', 3, 8), ('residents', 3, 9), ('and', 12, 3), ('tuition-free', 2, 12), ('full-time', 2, 9), ('community', 1, 9), ('pushing', 1, 7), ('approved', 1, 8), ('%', 2, 1), ('support', 2, 7), ('gap', 1, 3), ('going', 1, 5), ('even', 1, 4), ('income', 1, 6), ('an', 2, 2), ('years', 2, 5), ('17', 1, 2), ('nation', 1, 6), ('include', 1, 7), ('gaining', 1, 7), ('apart', 1, 5), ('part-time', 1, 9), ('capacity', 1, 8), ('less', 3, 4), ('matter', 1, 6), ('people', 3, 6), ('used', 1, 4), ('28,000', 1, 6), ('individual', 1, 10), ('sign', 1, 4), ('500,000', 1, 7), ('fastest', 1, 7), ('46', 1, 2), ('by', 3, 2), ('resided', 1, 7), ('classes', 1, 7), ('commercial', 1, 10), ('First', 1, 5), ('Chancellor', 1, 10), ('take', 2, 4), ('worth', 1, 5), ('starts', 1, 6), ('York', 2, 4), ('round', 1, 5), ('influx', 1, 6), ('credits', 1, 7), ('was', 2, 3), ('You', 1, 3), ('too', 1, 3), ('voters', 1, 6), ('estate', 1, 6), ('What', 1, 4), ('public', 2, 6), ('Making', 1, 6), ('handle', 1, 6), ("'tuition-free", 1, 13), ('pay', 3, 3), ('The', 6, 3), (':', 2, 1), ('class', 2, 5), ('that', 3, 4), ('how', 3, 3), ('the', 24, 3), ('37,000', 1, 6), ('hike', 1, 4), ('Rhode', 2, 5), ('City', 3, 4), ('seeking', 1, 7), ('stay', 1, 4), ('Monday', 1, 6), ('push', 1, 4), ('45', 1, 2), ('four', 1, 4), ('additional', 1, 10), ('Kim', 2, 3), ('money', 2, 5), ('than', 6, 4), ('qualify', 1, 7), ('two', 2, 3), ('expected', 3, 8), ('books', 1, 5), ('Susan', 1, 5), ('necessarily', 1, 11), ('much', 1, 4), ('provide', 1, 7), ('opportunities', 1, 13), ('offering', 1, 8), ('has', 3, 3), ('real', 1, 4), ('properties', 3, 10), ('do', 1, 2), ('who', 3, 3), ('lawmaker', 1, 8), ('in', 6, 2), ('then', 1, 4), ('85,000', 1, 6), ('14K', 1, 3), ('Lawmakers', 1, 9), ('semester', 1, 8), ('is', 8, 2), ('eligible', 1, 8), ('Eligible', 1, 8), ('reassess', 1, 8), ('both', 1, 4), ('to', 24, 2), ('aid', 1, 3), ('adults', 1, 6), ('four-year', 1, 9), ('An', 1, 2), ('17,000', 1, 6), ('this', 1, 4), ('San', 7, 3), ('least', 2, 5), ('founders', 1, 8), ('retraining', 1, 10), ('2.25', 1, 4), ('any', 1, 3), ('also', 2, 4), ('plan', 4, 4), ('This', 1, 4), ('be', 5, 2), ('November', 1, 8), ('housing', 1, 7), ('And', 1, 3), ('city', 6, 4), ('it', 3, 2), ('free', 7, 4), ('senior', 1, 6), ('other', 1, 5), ("'s", 8, 2), ('one-time', 1, 8), ('College', 3, 7), ('conference', 1, 10), ('if', 1, 2), ('New', 2, 3), ('``', 3, 2), ('mandatory', 1, 9), ('courses', 1, 7), ('long', 1, 4), ('free-tuition', 1, 12), ('program', 2, 7), ('graduate', 1, 8), ('would', 1, 5), ('controller', 1, 10), ('currently', 2, 9), ('poorest', 1, 7), ('per', 2, 3), ('5.4', 1, 3), ('so', 1, 2), ("'", 1, 1), ('according', 1, 9), ('children', 1, 8), ('increased', 1, 9), ('school', 4, 6), ('governor', 2, 8), ('Island', 2, 6), ('next', 1, 4), ('help', 2, 4), ('discussing', 1, 10), ('many', 1, 4), ('$', 13, 1), ('Jane', 1, 4), ('fee', 1, 3), ('college', 4, 7), ('a', 12, 1), ('family', 1, 6), ('returning', 1, 9), ('into', 2, 4), ('growing', 1, 7), ('want', 1, 4), ('services', 1, 8), ('impact', 1, 6), ('no', 1, 2), ("''", 3, 2), ('press', 1, 5), ('expenses', 1, 8), ('That', 1, 4), ('more', 6, 4), ('But', 1, 3), ('hook', 1, 4), ('2015', 1, 4), ('tax', 2, 3), (',', 14, 1), ('graduates', 1, 9), ('enrolled', 1, 8), ('3', 1, 1), ('get', 2, 3), ('everyone', 1, 8), ('country', 2, 7), ('language', 1, 8), ('includes', 1, 8), ('average', 1, 7), ('offers', 1, 6), ('greater', 1, 7), ('others', 1, 6), ('one', 1, 3), ('million', 4, 7), ('you', 1, 3), ('rich', 1, 4), ('means', 1, 5), ('job', 1, 3), ('SmartAsset.com', 2, 14), ('encourage', 1, 9), ('these', 1, 5), ('at', 7, 2), ('expand', 1, 6), ('as', 3, 2), ('started', 1, 7), ('Lamb', 1, 4), ('students', 5, 8), ('taxes', 1, 5), ('tuition', 2, 7), ('costing', 1, 7), ('will', 8, 4), ('bring', 1, 5), ('committed', 1, 9), ('stipend', 1, 7), ('about', 1, 5), ('Students', 1, 8), ('wo', 2, 2), ('general', 1, 7), ('difficult', 1, 9), ('two-year', 1, 8), ('Why', 1, 3), ('Tennessee', 1, 9), ('enroll', 1, 6), ('selling', 1, 7), ('Franciscans', 2, 11), ('make', 2, 4), ('high', 2, 4), ('end', 1, 3), ('predict', 1, 7), ('recent', 2, 6), ('25', 1, 2), ('covers', 1, 6), ('200', 1, 3), ('residential', 1, 11), ('are', 4, 3), ('year', 9, 4), ('Francisco', 5, 9), ('still', 2, 5), ('500', 1, 3), ('Facebook', 1, 8), ('few', 1, 3), ('credit', 1, 6), ('sets', 1, 4)]

In [70]:
for x in model:
    print( "\t".join( (str(x[1]), str(x[2]), x[0]) ) )


2	6	across
1	11	progressive
5	4	have
2	6	middle
1	5	wants
2	4	earn
1	4	last
3	2	It
18	3	for
1	4	fund
8	2	of
3	2	on
1	2	We
1	3	she
2	4	goes
2	4	they
1	1	5
1	6	called
4	4	cost
1	10	affordable
1	7	Powered
26	1	.
3	2	or
1	8	transfer
1	7	foreign
3	2	up
1	5	enter
4	4	said
2	7	Related
3	3	n't
1	7	125,000
3	8	colleges
3	9	residents
12	3	and
2	12	tuition-free
2	9	full-time
1	9	community
1	7	pushing
1	8	approved
2	1	%
2	7	support
1	3	gap
1	5	going
1	4	even
1	6	income
2	2	an
2	5	years
1	2	17
1	6	nation
1	7	include
1	7	gaining
1	5	apart
1	9	part-time
1	8	capacity
3	4	less
1	6	matter
3	6	people
1	4	used
1	6	28,000
1	10	individual
1	4	sign
1	7	500,000
1	7	fastest
1	2	46
3	2	by
1	7	resided
1	7	classes
1	10	commercial
1	5	First
1	10	Chancellor
2	4	take
1	5	worth
1	6	starts
2	4	York
1	5	round
1	6	influx
1	7	credits
2	3	was
1	3	You
1	3	too
1	6	voters
1	6	estate
1	4	What
2	6	public
1	6	Making
1	6	handle
1	13	'tuition-free
3	3	pay
6	3	The
2	1	:
2	5	class
3	4	that
3	3	how
24	3	the
1	6	37,000
1	4	hike
2	5	Rhode
3	4	City
1	7	seeking
1	4	stay
1	6	Monday
1	4	push
1	2	45
1	4	four
1	10	additional
2	3	Kim
2	5	money
6	4	than
1	7	qualify
2	3	two
3	8	expected
1	5	books
1	5	Susan
1	11	necessarily
1	4	much
1	7	provide
1	13	opportunities
1	8	offering
3	3	has
1	4	real
3	10	properties
1	2	do
3	3	who
1	8	lawmaker
6	2	in
1	4	then
1	6	85,000
1	3	14K
1	9	Lawmakers
1	8	semester
8	2	is
1	8	eligible
1	8	Eligible
1	8	reassess
1	4	both
24	2	to
1	3	aid
1	6	adults
1	9	four-year
1	2	An
1	6	17,000
1	4	this
7	3	San
2	5	least
1	8	founders
1	10	retraining
1	4	2.25
1	3	any
2	4	also
4	4	plan
1	4	This
5	2	be
1	8	November
1	7	housing
1	3	And
6	4	city
3	2	it
7	4	free
1	6	senior
1	5	other
8	2	's
1	8	one-time
3	7	College
1	10	conference
1	2	if
2	3	New
3	2	``
1	9	mandatory
1	7	courses
1	4	long
1	12	free-tuition
2	7	program
1	8	graduate
1	5	would
1	10	controller
2	9	currently
1	7	poorest
2	3	per
1	3	5.4
1	2	so
1	1	'
1	9	according
1	8	children
1	9	increased
4	6	school
2	8	governor
2	6	Island
1	4	next
2	4	help
1	10	discussing
1	4	many
13	1	$
1	4	Jane
1	3	fee
4	7	college
12	1	a
1	6	family
1	9	returning
2	4	into
1	7	growing
1	4	want
1	8	services
1	6	impact
1	2	no
3	2	''
1	5	press
1	8	expenses
1	4	That
6	4	more
1	3	But
1	4	hook
1	4	2015
2	3	tax
14	1	,
1	9	graduates
1	8	enrolled
1	1	3
2	3	get
1	8	everyone
2	7	country
1	8	language
1	8	includes
1	7	average
1	6	offers
1	7	greater
1	6	others
1	3	one
4	7	million
1	3	you
1	4	rich
1	5	means
1	3	job
2	14	SmartAsset.com
1	9	encourage
1	5	these
7	2	at
1	6	expand
3	2	as
1	7	started
1	4	Lamb
5	8	students
1	5	taxes
2	7	tuition
1	7	costing
8	4	will
1	5	bring
1	9	committed
1	7	stipend
1	5	about
1	8	Students
2	2	wo
1	7	general
1	9	difficult
1	8	two-year
1	3	Why
1	9	Tennessee
1	6	enroll
1	7	selling
2	11	Franciscans
2	4	make
2	4	high
1	3	end
1	7	predict
2	6	recent
1	2	25
1	6	covers
1	3	200
1	11	residential
4	3	are
9	4	year
5	9	Francisco
2	5	still
1	3	500
1	8	Facebook
1	3	few
1	6	credit
1	4	sets

In [71]:
from nltk.corpus import stopwords

In [72]:
stopw = stopwords.words("english")
stopw.append("us")

In [73]:
def isStopword(word):
    if word in stopw:
        return(1)
    return(0)

for x in model:
    print( "\t".join( (str(x[1]), str(x[2]), x[0], str(isStopword(x[0]))) ) )


2	6	across	0
1	11	progressive	0
5	4	have	1
2	6	middle	0
1	5	wants	0
2	4	earn	0
1	4	last	0
3	2	It	0
18	3	for	1
1	4	fund	0
8	2	of	1
3	2	on	1
1	2	We	0
1	3	she	1
2	4	goes	0
2	4	they	1
1	1	5	0
1	6	called	0
4	4	cost	0
1	10	affordable	0
1	7	Powered	0
26	1	.	0
3	2	or	1
1	8	transfer	0
1	7	foreign	0
3	2	up	1
1	5	enter	0
4	4	said	0
2	7	Related	0
3	3	n't	0
1	7	125,000	0
3	8	colleges	0
3	9	residents	0
12	3	and	1
2	12	tuition-free	0
2	9	full-time	0
1	9	community	0
1	7	pushing	0
1	8	approved	0
2	1	%	0
2	7	support	0
1	3	gap	0
1	5	going	0
1	4	even	0
1	6	income	0
2	2	an	1
2	5	years	0
1	2	17	0
1	6	nation	0
1	7	include	0
1	7	gaining	0
1	5	apart	0
1	9	part-time	0
1	8	capacity	0
3	4	less	0
1	6	matter	0
3	6	people	0
1	4	used	0
1	6	28,000	0
1	10	individual	0
1	4	sign	0
1	7	500,000	0
1	7	fastest	0
1	2	46	0
3	2	by	1
1	7	resided	0
1	7	classes	0
1	10	commercial	0
1	5	First	0
1	10	Chancellor	0
2	4	take	0
1	5	worth	0
1	6	starts	0
2	4	York	0
1	5	round	0
1	6	influx	0
1	7	credits	0
2	3	was	1
1	3	You	0
1	3	too	1
1	6	voters	0
1	6	estate	0
1	4	What	0
2	6	public	0
1	6	Making	0
1	6	handle	0
1	13	'tuition-free	0
3	3	pay	0
6	3	The	0
2	1	:	0
2	5	class	0
3	4	that	1
3	3	how	1
24	3	the	1
1	6	37,000	0
1	4	hike	0
2	5	Rhode	0
3	4	City	0
1	7	seeking	0
1	4	stay	0
1	6	Monday	0
1	4	push	0
1	2	45	0
1	4	four	0
1	10	additional	0
2	3	Kim	0
2	5	money	0
6	4	than	1
1	7	qualify	0
2	3	two	0
3	8	expected	0
1	5	books	0
1	5	Susan	0
1	11	necessarily	0
1	4	much	0
1	7	provide	0
1	13	opportunities	0
1	8	offering	0
3	3	has	1
1	4	real	0
3	10	properties	0
1	2	do	1
3	3	who	1
1	8	lawmaker	0
6	2	in	1
1	4	then	1
1	6	85,000	0
1	3	14K	0
1	9	Lawmakers	0
1	8	semester	0
8	2	is	1
1	8	eligible	0
1	8	Eligible	0
1	8	reassess	0
1	4	both	1
24	2	to	1
1	3	aid	0
1	6	adults	0
1	9	four-year	0
1	2	An	0
1	6	17,000	0
1	4	this	1
7	3	San	0
2	5	least	0
1	8	founders	0
1	10	retraining	0
1	4	2.25	0
1	3	any	1
2	4	also	0
4	4	plan	0
1	4	This	0
5	2	be	1
1	8	November	0
1	7	housing	0
1	3	And	0
6	4	city	0
3	2	it	1
7	4	free	0
1	6	senior	0
1	5	other	1
8	2	's	0
1	8	one-time	0
3	7	College	0
1	10	conference	0
1	2	if	1
2	3	New	0
3	2	``	0
1	9	mandatory	0
1	7	courses	0
1	4	long	0
1	12	free-tuition	0
2	7	program	0
1	8	graduate	0
1	5	would	0
1	10	controller	0
2	9	currently	0
1	7	poorest	0
2	3	per	0
1	3	5.4	0
1	2	so	1
1	1	'	0
1	9	according	0
1	8	children	0
1	9	increased	0
4	6	school	0
2	8	governor	0
2	6	Island	0
1	4	next	0
2	4	help	0
1	10	discussing	0
1	4	many	0
13	1	$	0
1	4	Jane	0
1	3	fee	0
4	7	college	0
12	1	a	1
1	6	family	0
1	9	returning	0
2	4	into	1
1	7	growing	0
1	4	want	0
1	8	services	0
1	6	impact	0
1	2	no	1
3	2	''	0
1	5	press	0
1	8	expenses	0
1	4	That	0
6	4	more	1
1	3	But	0
1	4	hook	0
1	4	2015	0
2	3	tax	0
14	1	,	0
1	9	graduates	0
1	8	enrolled	0
1	1	3	0
2	3	get	0
1	8	everyone	0
2	7	country	0
1	8	language	0
1	8	includes	0
1	7	average	0
1	6	offers	0
1	7	greater	0
1	6	others	0
1	3	one	0
4	7	million	0
1	3	you	1
1	4	rich	0
1	5	means	0
1	3	job	0
2	14	SmartAsset.com	0
1	9	encourage	0
1	5	these	1
7	2	at	1
1	6	expand	0
3	2	as	1
1	7	started	0
1	4	Lamb	0
5	8	students	0
1	5	taxes	0
2	7	tuition	0
1	7	costing	0
8	4	will	1
1	5	bring	0
1	9	committed	0
1	7	stipend	0
1	5	about	1
1	8	Students	0
2	2	wo	0
1	7	general	0
1	9	difficult	0
1	8	two-year	0
1	3	Why	0
1	9	Tennessee	0
1	6	enroll	0
1	7	selling	0
2	11	Franciscans	0
2	4	make	0
2	4	high	0
1	3	end	0
1	7	predict	0
2	6	recent	0
1	2	25	0
1	6	covers	0
1	3	200	0
1	11	residential	0
4	3	are	1
9	4	year	0
5	9	Francisco	0
2	5	still	0
1	3	500	0
1	8	Facebook	0
1	3	few	1
1	6	credit	0
1	4	sets	0

In [88]:
from nltk import pos_tag

In [95]:
tokens1 = word_tokenize(text1).lower())
posTokens = pos_tag(tokens1)

In [96]:
tags = list( set( [ x[1][0] for x in posTokens ] ) )

print(tags)


['C', 'D', 'R', '.', ':', 'W', ',', 'N', 'P', 'J', 'T', "'", 'V', 'M', '`', 'I', '$']

In [97]:
from collections import defaultdict

leftOfToken = defaultdict(Counter)
rightOfToken = defaultdict(Counter)

for i in range(len(posTokens)):
    tag = posTokens[i][1][0]
    token = (posTokens[i][0], tag)
    if i > 0:
        ltag = posTokens[i - 1][1][0]
        leftOfToken[token][ltag] += 1
    if i < len(posTokens) - 1:
        rtag = posTokens[i + 1][1][0]
        rightOfToken[token][rtag] += 1

In [98]:
for token in leftOfToken.keys():
    leftVector = []
    rightVector = []
    for tag in tags:
        leftVector.append(leftOfToken[token][tag])
        rightVector.append(rightOfToken[token][tag])
    print(" ".join([ str(x) for x in leftVector ]), " ".join([ str(x) for x in rightVector ]), token[0], token[1])


0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 growing V
1 7 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 3 0 0 1 0 0 0 2 0 0 0 0 2 0 year N
1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 cost N
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 everyone N
0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 class N
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 Why W
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 books N
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 : :
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 But C
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 retraining V
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 general J
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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A flight out of Austin, Texas, was delayed after
a pilot behaved in a way that caused passengers to believe
she was mentally unstable, a United Airlines spokesman said Sunday.
The pilot, whom CNN is not naming, boarded the plane in street
clothes and began speaking to passengers over the intercom,
spokesman Charlie Hobart said.
Passengers on Saturday's San Francisco-bound flight took to
social media to express concerns after the pilot spoke to
them about her divorce and the presidential election, among
other issues. """

tokens2 = word_tokenize(text2).lower())

posTokens2 = pos_tag(tokens2)

leftOfToken2 = defaultdict(Counter)
rightOfToken2 = defaultdict(Counter)

for i in range(len(posTokens2)):
    token = (posTokens2[i][0], posTokens2[i][1][0])
    if i > 0:
        ltag = posTokens2[i - 1][1][0]
        leftOfToken2[token][ltag] += 1
    if i < len(posTokens2) - 1:
        rtag = posTokens2[i + 1][1][0]
        rightOfToken2[token][rtag] += 1

for token in leftOfToken2.keys():
    leftVector = []
    rightVector = []
    for tag in tags:
        leftVector.append(leftOfToken2[token][tag])
        rightVector.append(rightOfToken2[token][tag])
    print(" ".join([ str(x) for x in leftVector ]), " ".join([ str(x) for x in rightVector ]), token[0], token[1])


0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 caused V
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 unstable J
0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 flight N
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Hobart N
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 clothes N
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 presidential J
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0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